import {
    http,
    api,
    httpService
} from '@/common/http/index.js';
import qs from 'qs';

//查询系统用户列表信息
export const querySystemUserInfo = (params = {}) => {
    return http.post(api.querySystemUserInfo, qs.stringify(params), {
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
}

//查询所有的角色信息
export const queryAllRoleInfo = (params = {}) => {
    return http.post(api.queryAllRoleInfo, qs.stringify(params), {
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
}

//新增系统用户
export const addSystemUserInfo = (params = {}) => {
    return http.post(api.addSystemUserInfo, qs.stringify(params), {
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
}

//编辑系统用户
export const updateSystemUserInfo = (params = {}) => {
    return http.post(api.updateSystemUserInfo, qs.stringify(params), {
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
}

//删除系统用户
export const deleteSystemUserInfo = (params = {}) => {
    return http.post(api.deleteSystemUserInfo, qs.stringify(params), {
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
}

//停用/启用系统用户
export const editSystemUserStatus = (params = {}) => {
    return http.post(api.editSystemUserStatus, qs.stringify(params), {
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    });
}
